﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;

namespace PcArduinoControl
{
	public class NonexistantAnalogInputPinException :
		ArgumentOutOfRangeException
	{
		const string cDefaultMessage =
			"This analog input pin does not exist.";

		public byte PinNumber { get; private set; }

		public NonexistantAnalogInputPinException() :
			base(cDefaultMessage)
		{ }

		public NonexistantAnalogInputPinException(string message) :
			base(message)
		{ }

		public NonexistantAnalogInputPinException(string message, Exception innerException) :
			base(message, innerException)
		{ }

		public NonexistantAnalogInputPinException(byte pin) :
			base(cDefaultMessage)
		{
			PinNumber = pin;
		}

		public NonexistantAnalogInputPinException(string message, byte pin) :
			base(message)
		{
			PinNumber = pin;
		}

		public NonexistantAnalogInputPinException(string message, Exception innerException, byte pin) :
			base(message, innerException)
		{
			PinNumber = pin;
		}

		protected NonexistantAnalogInputPinException(SerializationInfo info, StreamingContext context) :
			base(info, context)
		{ }
	}
}
